/*
1.保证每个路由的name是唯一的，不能重复
*/
import Layout from '@/layout'
export default [
    {
        path: '/login',
        name: 'login',
        meta: { title: '登录' },
        component: () => import( '../views/login.vue')
    },
    {
        path: '/', 
        redirect: '/marketing',
    },
    {
        path: '/marketing',
        component: Layout,
        name: 'marketing',
        redirect: '/marketing/privapeSea',
        meta: { title: '营销', icon: 'icon-friend' },
        children: [
            {
                path: 'privapeSea',
                name: 'privapeSea',
                component: () => import('@/views/marketing/privapeSea'),
                meta: { title: '私海', icon: '' }
            },
            {
                path: 'publicSea',
                name: 'publicSea',
                component: () => import('@/views/marketing/publicSea'),
                meta: { title: '公海', icon: '' }
            },
            {
                path: 'contract',
                name: 'contract',
                component: () => import('@/views/marketing/contract'),
                meta: { title: '合同', icon: '' }
            },
            {
                path: 'businessStatistics',
                name: 'businessStatistics',
                component: () => import('@/views/marketing/businessStatistics'),
                meta: { title: '业务统计', icon: '' }
            },
        ]
    },
    {
        path: '/customer',
        component: Layout,
        name: 'customer',
        redirect: '/customer/index',
        meta: { title: '客户', icon: 'icon-tianjiapengyou' },
        children: [
            {
                path: 'index',
                name: 'customerIndex',
                component: () => import('@/views/customer/index'),
                meta: { title: '客户', icon: '' }
            }
        ]
    },
    {
        path: '/service',
        component: Layout,
        name: 'service',
        redirect: '/service/index',
        meta: { title: '服务', icon: 'icon--fuwu' },
        children: [
            {
                path: 'index',
                name: 'serviceIndex',
                component: () => import('@/views/service/index'),
                meta: { title: '服务', icon: '' }
            }
        ]
    },
    {
        path: '/money',
        component: Layout,
        name: 'money',
        redirect: '/money/index',
        meta: { title: '款项', icon: 'icon-fukuan' },
        children: [
            {
                path: 'index',
                name: 'moneyIndex',
                component: () => import('@/views/money/index'),
                meta: { title: '款项', icon: '' }
            }
        ]
    },
    {
        path: '/information',
        component: Layout,
        name: 'information',
        redirect: '/information/index',
        meta: { title: '数据', icon: 'icon-shuju' },
        children: [
            {
                path: 'index',
                name: 'informationIndex',
                component: () => import('@/views/information/index'),
                meta: { title: '数据', icon: '' }
            }
        ]
    },
    {
        path: '/record',
        component: Layout,
        name: 'record',
        redirect: '/record/index',
        meta: { title: '记录', icon: 'icon-fankui' },
        children: [
            {
                path: 'index',
                name: 'recordIndex',
                component: () => import('@/views/record/index'),
                meta: { title: '记录', icon: '' }
            }
        ]
    },
    {
        path: '/setting',
        component: Layout,
        name: 'setting',
        redirect: '/setting/index',
        meta: { title: '设置', icon: 'icon-31shezhi' },
        children: [
            {
                path: 'index',
                name: 'settingIndex',
                component: () => import('@/views/setting/index'),
                meta: { title: '设置', icon: '' }
            }
        ]
    },
    
]
